package com.glodon.paas.monitor.web.controller;

import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.util.WebUtils;

import com.glodon.paas.monitor.server.biz.domain.MonitorUserEntity;

@Controller
public class HomeController {

	@RequestMapping(value = "main", method = RequestMethod.GET)
	public ModelAndView mainIndex(ModelMap model, HttpServletRequest request) {
		MonitorUserEntity loginUser = (MonitorUserEntity) WebUtils.getSessionAttribute(request, "loginUser");
		model.addAttribute("loginUser", loginUser);
		return new ModelAndView("main", model);
	}

}
